<?php
class CategoryController extends CController{
    
    //list
    public function actionIndex(){
        
    }
    
    /**
     * create category
     */
    public function actionCreate(){
        
        $category = new Category();
        if(isset($_POST['Category'])){
            $category->attributes = $_POST['Category'];
            
            if($category->validate()){
                $category->save();
            }
        }
        $this->render('create',array('model' => $category));
    }
}